package com.dms.modules.order.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("order_item")
@ApiModel("订单项实体")
public class OrderItem {
    
    @TableId(type = IdType.AUTO)
    @ApiModelProperty("订单项ID")
    private Long id;
    
    @ApiModelProperty("订单ID")
    private Long orderId;
    
    @ApiModelProperty("商品ID")
    private Long productId;
    
        @ApiModelProperty("商家ID")
    private Long merchantId;
    @ApiModelProperty("SKU ID")
    private Long skuId;
    
    @ApiModelProperty("商品快照")
    private String productSnapshot;
    
    @ApiModelProperty("购买数量")
    private Integer quantity;
    
    @ApiModelProperty("购买单价")
    private BigDecimal price;
    
    @ApiModelProperty("总金额")
    private BigDecimal totalAmount;
    
    @ApiModelProperty("商品名称")
    private String productName;
    
    @ApiModelProperty("SKU名称")
    private String skuName;
    
    @ApiModelProperty("商品图片")
    private String productImg;
    
    @ApiModelProperty("规格信息JSON")
    private String specInfo;
    
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("是否删除")
    @TableLogic
    private Integer deleted;
} 